//test ArrayList<String>();

import java.util.*;
import java.io.*;
import javax.swing.*;

public class TestArrayList
{
	private ArrayList<String> arrayList = new ArrayList<String>();
	private int count = 0;
	
	public TestArrayList()
	{
	
	}
	
	public void caught()
      {
         try
         {
            Scanner scFile = new Scanner(new File("ToDo.txt"));
            String line;
         
            while(scFile.hasNext())
            {
               line = scFile.nextLine();

               arrayList.add(line);
					//reads into array correctly :)

               count++;
            }
            scFile.close();
         }
            catch(FileNotFoundException e)
            {
               System.out.println("File not found: ToDo.txt");
            }
				
      }//end of caught()
		
	public String toString()
	{
		String temp = "";
		
		for(int loop = 0; loop > arrayList.size(); loop++)
		{
			temp = temp+arrayList.get(loop) + "\n";
		}
		
		return temp;
	}
}